var read_line = require('readline-sync')
read_line.setDefaultOptions({ prompt: '' })
var read_line = read_line.prompt
let [n, x, y, k] = read_line().split(' ').map((item) => parseInt(item)) // 转成数字
let arr = read_line().split(' ').map((item) => parseInt(item) * x) // 是如果用手的话 每一堆转要多久
let pq = new myPriorityQueue()
for (let i = 0; i < n; i++) {
  pq.enqueue(arr[i], arr[i])
}
let res = 0
for (let i = 0; i < n; i++) {
  if (arr[i] > y && k > 0) {
    res = res + y
    k--
  } else {
    res += arr[i]
  }
}
console.log(res)
function myPriorityQueue () {
  //存放每一个插入元素QueueElement
  this.items = [];
  //定义内部类--封装插入元素
  function QueueElement (element, priority) {
    this.element = element;
    this.priority = priority;
  }
  //实现插入操作
  myPriorityQueue.prototype.enqueue = function (element, priority) {
    var qe = new QueueElement(element, priority);
    if (this.items.length === 0) {
      this.items.push(qe);
    } else {
      var flag = false; //记录元素是否插入，没有就插入到items最后
      for (var i = 0; i < this.items.length; i++) {
        if (priority > this.items[i].priority) {
          this.items.splice(i, 0, qe);
          flag = true;
          break;
        }
      }
      if (!flag) {	//没有就插入到items最后
        this.items.push(qe);
      }
    }
  }

  //2.将元素从队列中移除
  myPriorityQueue.prototype.dequeue = function () {
    return this.items.shift();
  }
  //3.查看队列中第一个元素
  myPriorityQueue.prototype.front = function () {
    return this.items[0];
  }
  //4.查看队列是否为空
  myPriorityQueue.prototype.isEmpty = function () {
    return this.items.length === 0;
  }
  //5.查看队列中元素的个数
  myPriorityQueue.prototype.size = function () {
    return this.items.length;
  }
  //6.toString
  myPriorityQueue.prototype.toString = function () {
    var result = '';
    for (var i = 0; i < this.items.length; i++) {
      result += this.items[i].element + '---' + this.items[i].priority + ' ';
    }
    return result;
  }
}